home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Greatest Childrens Stories Ever Told
/
Greatest_Stories.iso
/
demos
/
funtown
/
demo.dir
/
00049_Script_Scripts 5
< prev
next >
Wrap
Text File
|
1994-11-08
|
4KB
|
112 lines
--òòò Scripts 4
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on randomizeQuestions NOQ
global mode, mode.1, MS, QL, WQ, availableQuestions, QC, TR
global NQ, RD, DQL, DAQ, NS, TCN, FTM
CheckNumbers
set NOQ = TCN
if not FTM then set NS = 0
set RD=0
set QC=the text of cast ( MS& " Questions" )
set availableQuestions=the number of lines in QC
if voidP ( NOQ ) then set NOQ=5
if mode.1 then set NOQ=availableQuestions
set QL=""
set CNL=""
put WQ into QuestionHolder
set WQ=1
set NQ=NOQ
repeat with x=1 to availableQuestions
set QL=QL& ","& x
end repeat
delete char 1 of QL
if not ( mode.1 ) then
repeat with x=1 to availableQuestions
set itemX=item ( x ) of QL
set itemRandom=random ( availableQuestions )
put item ( itemRandom ) of QL into item ( x ) of QL
put itemX into item ( itemRandom ) of QL
end repeat
set RD=1
set WQ=1
set NQ = 5
checkRandomOrder
if FTM then
set FTM = false
set WQ = QuestionHolder
else
set WQ = 1
end if
repeat with x=2 to 31
set the locV of sprite x=1000
end repeat
unloadCast
exit
end if
end
--¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
on CheckRandomOrder
global mode, mode.1, MS, QL, WQ, availableQuestions, QC, TR
global NQ, RD, DQL, DAQ, NS, TCN, NOQ, CNL
repeat with x=1 to NOQ
set duplicateNumber=0
set WQ=value ( item ( x ) of QL )
if duplicateNumber=0 then
set spriteName=item 1 of line ( WQ ) of QC
if CNL contains spriteName then set duplicateNumber=1
else
if not ( spriteName contains "òNo Patch" ) then set CNL=CNL& spriteName& ","
set CNL=CNL& spriteName2& ","
end if
else
if not ( spriteName contains "òNo Patch" ) then set CNL=CNL& spriteName& ","
end if
if duplicateNumber=1 then
delete item ( x ) of QL
set x=x-1
set availableQuestions=availableQuestions-1
if NOQ>availableQuestions then
set QL="NOQ>availableQuestions"
randomizeQuestions NOQ
exit
end if
end if
end repeat
if char 1 of QL="," then delete char 1 of QL
set lastChar=char ( the number of chars in QL ) of QL
if lastChar="," then delete char ( the number of chars in QL ) of QL
put "Random list of "& NOQ& " numbers: "& QL
end
--¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
on doWindow
set the Rect of Window "Win" = rect(the StageLeft+120, the StageTop + 30, the StageLeft + 408, the StageTop + 218)
set the titleVisible of window "Win" = False
set the modal of window "Win" to true
open Window "Win"
tell window "Win" to go label ( "Start" )
pause
end
--¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
on doWindow2
set the Rect of Window "Win" = rect(the StageLeft+120, the StageTop + 30, the StageLeft + 408, the StageTop + 218)
set the titleVisible of window "Win" = False
set the modal of window "Win" to true
open Window "Win"
tell window "Win" to go label ( "help" )
pause
end
--¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
on doWindow3
set the Rect of Window "Win" = rect(the StageLeft+120, the StageTop + 30, the StageLeft + 408, the StageTop + 218)
set the titleVisible of window "Win" = False
set the modal of window "Win" to true
open Window "Win"
tell window "Win" to go label ( "map" )
puppetsound 0
pause
end